<?php
	require "settings/config.php";
	require "layout.php";
	require "includes/session.php";
	require "includes/sql_functions.php";
	require "includes/slot_functions.php";
	require "includes/game_functions.php";
	
	oh_require_admin();
	
	render_header("Game Management");
	
	$slots=oh_get_all_slots();
	
	foreach($slots as $slot)
	{
	
		echo "<div style=\"display:inline-block;vertical-align:top;padding:0.5em;\">\n";
		echo "<table><tr>\n";
		echo "<td class=\"regtablehead\">\n";
		oh_slot_print($slot);
		echo "</td></tr>\n";
		oh_render_games_for_slot_admin($slot->slot_id);
		echo "<tr><td class=\"regtablebody\">\n";
		make_button("Add game","game_add.php?slot=".$slot->slot_id);
		echo "</tr></td>\n";
		echo "</table></div>\n";

	}
	
	render_footer();
?>